<template>
  <div class="homeCard">
    <div class="header">
      <div>
        <slot name="title"></slot>
      </div>
      <span class="more" @click="goMore" v-if="hasMore">查看更多></span>
    </div>
    <div class="slot">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: "homeCard",
  props:{
    hasMore:{
      default:true
    }
  },
  methods:{
    goMore(){
      this.$emit('goMore')
    },
  }
}
</script>

<style scoped lang="less">
.homeCard {
  background: #FFFFFF;
  border-radius: 8px;
  width: 100%;
  height: 100%;
  .slot{
    padding: 12px;
  }
  .header{
    height: 4.8rem;
    padding: 0 1.5rem;
    border-bottom: 0.1rem solid #EEEEEE;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .more{
      cursor: pointer;
      font-size: 1.6rem;
      color: #999999;
    }
  }
}
</style>